<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="iOS开发," />





  <link rel="alternate" href="/atom.xml" title="尛孟的博客" type="application/atom+xml" />






<meta name="description" content="平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化…… 不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢~~  没错就是它，有时候做登录界面测试是时老是弹出来，输完自己正确的账号或密码之后以为可以了结果它一个回马枪”帮”你把错误”修正”了，我还要重新输一遍还要小心翼翼地点那个小叉叉,妈的智障！">
<meta name="keywords" content="iOS开发">
<meta property="og:type" content="article">
<meta property="og:title" content="关于模拟器上键盘输入的一些小问题">
<meta property="og:url" content="http://yoursite.com/2016/04/04/关于模拟器上键盘输入的一些小问题/index.html">
<meta property="og:site_name" content="尛孟的博客">
<meta property="og:description" content="平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化…… 不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢~~  没错就是它，有时候做登录界面测试是时老是弹出来，输完自己正确的账号或密码之后以为可以了结果它一个回马枪”帮”你把错误”修正”了，我还要重新输一遍还要小心翼翼地点那个小叉叉,妈的智障！">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://www.z4a.net/images/2018/01/09/keyboard_1.jpg">
<meta property="og:image" content="http://www.z4a.net/images/2018/01/09/keyboard_2.png">
<meta property="og:image" content="http://www.z4a.net/images/2018/01/09/keyboard_3.png">
<meta property="og:image" content="http://www.z4a.net/images/2018/01/09/keyboard_4.png">
<meta property="og:updated_time" content="2018-01-09T12:49:51.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="关于模拟器上键盘输入的一些小问题">
<meta name="twitter:description" content="平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化…… 不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢~~  没错就是它，有时候做登录界面测试是时老是弹出来，输完自己正确的账号或密码之后以为可以了结果它一个回马枪”帮”你把错误”修正”了，我还要重新输一遍还要小心翼翼地点那个小叉叉,妈的智障！">
<meta name="twitter:image" content="http://www.z4a.net/images/2018/01/09/keyboard_1.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"hide","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: 'ZNJ0RM31SP',
      apiKey: '9fae47ade11c769ab25bba4061522c1d',
      indexName: 'for_meng',
      hits: {"per_page":10},
      labels: {"input_placeholder":"输入关键词进行搜索","hits_empty":" 找不到关于 ”${query}“ 的文章 ","hits_stats":" 共找到${hits} 篇文章,花了${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2016/04/04/关于模拟器上键盘输入的一些小问题/"/>




<script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
<link href="//cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">


  <title>关于模拟器上键盘输入的一些小问题 | 尛孟的博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">尛孟的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">想法总是无法付诸实践…</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup search-popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2016/04/04/关于模拟器上键盘输入的一些小问题/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="尛孟">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="尛孟的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">关于模拟器上键盘输入的一些小问题</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-04-04T12:38:00+08:00">
                2016-04-04
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/iOSDevelopment/" itemprop="url" rel="index">
                    <span itemprop="name">iOS开发</span>
                  </a>
                </span>

                
                
                  ， 
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/iOSDevelopment/Project-daily/" itemprop="url" rel="index">
                    <span itemprop="name">项目/日常问题</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/2016/04/04/关于模拟器上键盘输入的一些小问题/" class="leancloud_visitors" data-flag-title="关于模拟器上键盘输入的一些小问题">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv"><i class="fa fa-file-o"></i>
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h5 id="平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化……"><a href="#平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化……" class="headerlink" title="平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化……"></a>平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化……</h5><hr>
<h6 id="不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢"><a href="#不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢" class="headerlink" title="不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢~~"></a>不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢~~</h6><hr>
<blockquote>
<p><img src="http://www.z4a.net/images/2018/01/09/keyboard_1.jpg" alt="keyboard_1.jpg"><br>没错就是它，有时候做登录界面测试是时老是弹出来，输完自己正确的账号或密码之后以为可以了结果它一个回马枪”帮”你把错误”修正”了，我还要重新输一遍还要小心翼翼地点那个小叉叉,妈的智障！</p>
<blockquote>
<h6 id="property-nonatomic-UITextAutocorrectionType-autocorrectionType"><a href="#property-nonatomic-UITextAutocorrectionType-autocorrectionType" class="headerlink" title="@property(nonatomic) UITextAutocorrectionType autocorrectionType;"></a>@property(nonatomic) UITextAutocorrectionType autocorrectionType;</h6><p>找了半天，原来是这个自动纠错属性在作怪，查看了一下它的枚举值，也就一个默认一个yes一个no，高兴得我立马把它改UITextAutocorrectionTypeNo，结果当然是整个世界都清净啦~~(≧▽≦)/~啦啦啦</p>
</blockquote>
</blockquote>
<hr>
<blockquote>
<h6 id="另外，除了上面那个比较坑的之外，还有下面这个"><a href="#另外，除了上面那个比较坑的之外，还有下面这个" class="headerlink" title="另外，除了上面那个比较坑的之外，还有下面这个"></a>另外，除了上面那个比较坑的之外，还有下面这个</h6><p><img src="http://www.z4a.net/images/2018/01/09/keyboard_2.png" alt="keyboard_2.png"><br>这个自动联想功能嘛，有人喜欢有人嫌…不过有时候真的挺烦它的，联想的东西几乎没卵用，顺手把它干掉吧~</p>
<blockquote>
<h6 id="property-nonatomic-UITextAutocapitalizationType-autocapitalizationType"><a href="#property-nonatomic-UITextAutocapitalizationType-autocapitalizationType" class="headerlink" title="@property(nonatomic)UITextAutocapitalizationType autocapitalizationType;"></a>@property(nonatomic)UITextAutocapitalizationType autocapitalizationType;</h6><p>它有四个枚举值<br>UITextAutocapitalizationTypeNone,            不进行联想<br>UITextAutocapitalizationTypeWords,           单词联想<br>UITextAutocapitalizationTypeSentences,     整句联想<br>UITextAutocapitalizationTypeAllCharacters, 所有字节都联想</p>
</blockquote>
</blockquote>
<hr>
<blockquote>
<h6 id="然后是在找这些个属性的时候发现的其他属性-感觉挺有用的，这些平时在Storyboard也能见到的，只不过代码似乎用得比较少"><a href="#然后是在找这些个属性的时候发现的其他属性-感觉挺有用的，这些平时在Storyboard也能见到的，只不过代码似乎用得比较少" class="headerlink" title="然后是在找这些个属性的时候发现的其他属性,感觉挺有用的，这些平时在Storyboard也能见到的，只不过代码似乎用得比较少~~"></a>然后是在找这些个属性的时候发现的其他属性,感觉挺有用的，这些平时在Storyboard也能见到的，只不过代码似乎用得比较少~~</h6><blockquote>
<h6 id="property-nonatomic-UITextSpellCheckingType-spellCheckingType"><a href="#property-nonatomic-UITextSpellCheckingType-spellCheckingType" class="headerlink" title="@property(nonatomic) UITextSpellCheckingType spellCheckingType"></a>@property(nonatomic) UITextSpellCheckingType spellCheckingType</h6><p>自动拼写检查，好像平时没怎么见它发挥作用…</p>
</blockquote>
<hr>
<blockquote>
<h6 id="property-nonatomic-UIKeyboardAppearance-keyboardAppearance"><a href="#property-nonatomic-UIKeyboardAppearance-keyboardAppearance" class="headerlink" title="@property(nonatomic) UIKeyboardAppearance keyboardAppearance;"></a>@property(nonatomic) UIKeyboardAppearance keyboardAppearance;</h6><p>键盘外观？？？其实也就一个日用一个夜用~~</p>
</blockquote>
<hr>
<blockquote>
<h6 id="property-nonatomic-BOOL-enablesReturnKeyAutomatically"><a href="#property-nonatomic-BOOL-enablesReturnKeyAutomatically" class="headerlink" title="@property(nonatomic) BOOL enablesReturnKeyAutomatically;"></a>@property(nonatomic) BOOL enablesReturnKeyAutomatically;</h6><p>以前我一直以为这个Return按钮的disable状态要自己控制，今天才发现原来苹果已经做好了,只要输入内容长度为0按钮就不可用…</p>
</blockquote>
<hr>
<blockquote>
<h6 id="property-nonatomic-getter-isSecureTextEntry-BOOL-secureTextEntry"><a href="#property-nonatomic-getter-isSecureTextEntry-BOOL-secureTextEntry" class="headerlink" title="@property(nonatomic,getter=isSecureTextEntry) BOOL secureTextEntry;"></a>@property(nonatomic,getter=isSecureTextEntry) BOOL secureTextEntry;</h6><p>安全输入，也就是暗文,做密码输入用的</p>
</blockquote>
<hr>
<blockquote>
<h6 id="property-nonatomic-UIKeyboardType-keyboardType"><a href="#property-nonatomic-UIKeyboardType-keyboardType" class="headerlink" title="@property(nonatomic) UIKeyboardType keyboardType;"></a>@property(nonatomic) UIKeyboardType keyboardType;</h6><p>键盘类型，自己测试了，但是有一些感觉跟其他的键盘长得一模一样，也不知道区别在哪里，就没有做记录了<br><img src="http://www.z4a.net/images/2018/01/09/keyboard_3.png" alt="keyboard_3.png"></p>
</blockquote>
<hr>
<blockquote>
<h6 id="property-nonatomic-UIKeyboardType-keyboardType-1"><a href="#property-nonatomic-UIKeyboardType-keyboardType-1" class="headerlink" title="@property(nonatomic) UIKeyboardType keyboardType;"></a>@property(nonatomic) UIKeyboardType keyboardType;</h6><p>Return按钮的类型，这里列举几个常用的，其他的就自己看吧  ~<br><img src="http://www.z4a.net/images/2018/01/09/keyboard_4.png" alt="keyboard_4.jpg"></p>
</blockquote>
</blockquote>
<hr>
<h6 id="这些个属性都是定义在UITextInputTraits协议里面的，而且UITextField-和-UITextView-都遵守了，所以都可以使用。不过呢，其实这些在Storyboard里面都可以找得到的…"><a href="#这些个属性都是定义在UITextInputTraits协议里面的，而且UITextField-和-UITextView-都遵守了，所以都可以使用。不过呢，其实这些在Storyboard里面都可以找得到的…" class="headerlink" title="这些个属性都是定义在UITextInputTraits协议里面的，而且UITextField 和 UITextView 都遵守了，所以都可以使用。不过呢，其实这些在Storyboard里面都可以找得到的…"></a>这些个属性都是定义在UITextInputTraits协议里面的，而且UITextField 和 UITextView 都遵守了，所以都可以使用。不过呢，其实这些在Storyboard里面都可以找得到的…</h6><hr>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/iOS开发/" rel="tag"># iOS开发</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/03/30/关于MJRefresh/" rel="next" title="关于MJRefresh">
                <i class="fa fa-chevron-left"></i> 关于MJRefresh
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/04/07/在使用TablView时碰到Nan错误/" rel="prev" title="在使用TablView时碰到Nan错误">
                在使用TablView时碰到Nan错误 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">尛孟</p>
              <p class="site-description motion-element" itemprop="description">与人联系甚少</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">26</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">13</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">3</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-5"><a class="nav-link" href="#平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化……"><span class="nav-number">1.</span> <span class="nav-text">平时用模拟器键盘输入的时候总会有一大堆令人无语的自动联想、纠错、拼写检查…不胜其烦！本来一直以为是输入法的问题，后来才发现原来是苹果做的小优化……</span></a><ol class="nav-child"><li class="nav-item nav-level-6"><a class="nav-link" href="#不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢"><span class="nav-number">1.1.</span> <span class="nav-text">不知道大家平时在做测试的时候有没有经常遇到下面的这些这种情况呢~~</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-UITextAutocorrectionType-autocorrectionType"><span class="nav-number">1.2.</span> <span class="nav-text">@property(nonatomic) UITextAutocorrectionType autocorrectionType;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#另外，除了上面那个比较坑的之外，还有下面这个"><span class="nav-number">1.3.</span> <span class="nav-text">另外，除了上面那个比较坑的之外，还有下面这个</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-UITextAutocapitalizationType-autocapitalizationType"><span class="nav-number">1.4.</span> <span class="nav-text">@property(nonatomic)UITextAutocapitalizationType autocapitalizationType;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#然后是在找这些个属性的时候发现的其他属性-感觉挺有用的，这些平时在Storyboard也能见到的，只不过代码似乎用得比较少"><span class="nav-number">1.5.</span> <span class="nav-text">然后是在找这些个属性的时候发现的其他属性,感觉挺有用的，这些平时在Storyboard也能见到的，只不过代码似乎用得比较少~~</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-UITextSpellCheckingType-spellCheckingType"><span class="nav-number">1.6.</span> <span class="nav-text">@property(nonatomic) UITextSpellCheckingType spellCheckingType</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-UIKeyboardAppearance-keyboardAppearance"><span class="nav-number">1.7.</span> <span class="nav-text">@property(nonatomic) UIKeyboardAppearance keyboardAppearance;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-BOOL-enablesReturnKeyAutomatically"><span class="nav-number">1.8.</span> <span class="nav-text">@property(nonatomic) BOOL enablesReturnKeyAutomatically;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-getter-isSecureTextEntry-BOOL-secureTextEntry"><span class="nav-number">1.9.</span> <span class="nav-text">@property(nonatomic,getter=isSecureTextEntry) BOOL secureTextEntry;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-UIKeyboardType-keyboardType"><span class="nav-number">1.10.</span> <span class="nav-text">@property(nonatomic) UIKeyboardType keyboardType;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#property-nonatomic-UIKeyboardType-keyboardType-1"><span class="nav-number">1.11.</span> <span class="nav-text">@property(nonatomic) UIKeyboardType keyboardType;</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#这些个属性都是定义在UITextInputTraits协议里面的，而且UITextField-和-UITextView-都遵守了，所以都可以使用。不过呢，其实这些在Storyboard里面都可以找得到的…"><span class="nav-number">1.12.</span> <span class="nav-text">这些个属性都是定义在UITextInputTraits协议里面的，而且UITextField 和 UITextView 都遵守了，所以都可以使用。不过呢，其实这些在Storyboard里面都可以找得到的…</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">尛孟</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>




        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  




  
  
  
  <link rel="stylesheet" href="/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/js/src/algolia-search.js?v=5.1.4"></script>



  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("KhsxPkrt4UYiKBnwYFY9zUTN-gzGzoHsz", "a1zezRocQqcmPxlFVdXKrhz9");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  

  

  

  

</body>
</html>
